<template>
	<view>
		<back :showBackText="false" customClass="bg-gradual-blue text-white" title="我的收藏"></back>
		<view class="flex flex-direction" style="min-height: 100vh;">
			<view class="flex-sub" style="margin-bottom: 270rpx;">
				<view class="segmented-control-container">
					<view class="segmented-control">
						<view class="segmented-item" :class="index==selectModelIndex?'segmented-active':''"
							v-for="(item,index) in selectModel" :key="index" @tap="selectModelTap" :data-id="index">
							{{item}}
						</view>
					</view>
				</view>
				
				<view class="collection-container" v-if="isLoad == true">
					<view @tap="courseTap" class="collection-item" :data-item="course"
						v-for="(course, idx) in listData" :key="idx">
						<view class="item-content">
							<view class="item-title">{{ course.name }}</view>
							<courselabel :code="course.code" :topicCount="course.count ? '共'+course.count+'题' :''"></courselabel>
						</view>
						<text class="chevron-icon cuIcon-right"></text>
					</view>
				</view>
				<empty v-if="isLoad == true && listData.length == 0"></empty>
			</view>
		</view>
	</view>
</template>

<script src="./coll.js"></script>
<style src="./coll.css"></style>